package com.example.ffmpegplayer.player;

import com.example.ffmpegplayer.view.MediaGLSurfaceView;

/**
 * @author ly-zhouxyi
 * @date 2024/3/4
 * @time 15:32
 */
public interface IPlayer {


    void setDataSource(String path);

    void setSurfaceView(MediaGLSurfaceView view);

    void prepareAsync();

    void start();

    void stop();

    void pause();

    void resume();

    void setScreenOnWhilePlaying(boolean screenOn);

    int getVideoWidth();

    int getVideoHeight();

    boolean isPlaying();

    void seekTo(int position);

    int getDuration();

    void release();

    void reset();

    /**
     * 0 立体 1 右 2 左
     * @param channel
     */
    void setChannelMute(int channel);
    void setVolumeMute(boolean mute);
    void setVolume(int volume);

    int getCurrentVolume();

    void setSpeed(float speed);

    void setPitch(float pitch);

    void registerIPlayerCallback(IPlayerCallback playerCallback);

    void unregisterIPlayerCallback();
}
